package com.hitqz.robot.driver.util;

import cn.hutool.core.util.RandomUtil;

/**
 * @author xupkun
 * @date 2023/8/9
 */
public class SeqUtil {

    public static synchronized Short nextId() {
        Long time = System.currentTimeMillis()/1000;
        int nextInt = RandomUtil.randomInt(1, 5000);
        return (short)(time.intValue() + nextInt);
    }

}
